Concurrent programming for shared-memory multiprocessors can include the ability for multiple threads to access the same data. The multiple threads execute on multiple processors, multiple processor cores, or other classes of parallelism that are attached to a memory shared between the processors. The shared-memory model is the most commonly deployed method of multithread communication. It allows multithreaded programs to be created in much the same way as sequential programming, which is a benefit because concurrent programming is itself notoriously difficult. Accessing memory without some form of coordination, however, risks introducing serious application errors such as race conditions and the like that often are difficult to track down and correct.
In order to implement the shared-memory model, concurrent programming uses care to avoid concurrent access and use of shared data that can create undesirable conditions. Many approaches to isolate shared state are directed to improving facilities for correct coordination of access to memory. These approaches can be very useful but often come at the expense of large-concurrent scalability. Another approach is to entirely forgo shared state between concurrent components and use only single-threaded access to memory such as through separate operating systems processes or address spaces for each concurrent component. This approach can require large amounts of overhead that can negate efficiencies gained from parallelization in an application.